/*******************************************************************************
** CopyRight (c) 2005-2008 SKY-MOBI Ltd. All rights reserved.
** Filename:  ad_manager.c
** Creator:   yuzhifeng
** Version:   0.0
** Date:      
** Description:
 *******************************************************************************/

#include "commdef.h"
#include "ad_i.h"
#include "ad_manager.h"
#include "ad_ui.h"
#include "appmgr.h"

#define AD_TEST_TXT1  "\x4e\xca\x5e\x74\x8f\xc7\x82\x82\x4e\x0d\x65\x36\x79\x3c\xff\x0c\x65\x36\x79\x3c\x53\xea\x65\x36\x81\x11\x6b\x8b\x7c\xbe\x00\x00"
#define AD_TEST_TXT2 "\x96\x05\x8b\xfb\x56\x68\x53\x73\x5c\x06\x53\xd1\x5e\x03\xff\x0c\x65\x6c\x8b\xf7\x51\x73\x6c\xe8\xff\x01\x00\x00"
#define AD_TEST_TXT3 "\x79\x5e\x5d\xde\x88\x4c\xff\x0c\x62\x11\x77\x0b\x88\x4c\x00\x00"

static AD_LIST* pADList;
AD_LIST* AD_GetList(void)
{
	/*
	pADList = mrc_malloc(sizeof(AD_LIST)+5*sizeof(AD_DATA));
	if(!pADList)
		return NULL;
	memset(pADList, 0, sizeof(AD_LIST)+5*sizeof(AD_DATA));

	pADList->num = 5;
	pADList->item[0].type = AD_CONTENT_TXT;
	pADList->item[0].u.text = (uint8 *)AD_TEST_TXT1;
	pADList->item[2].type = AD_CONTENT_TXT;
	pADList->item[2].u.text = (uint8 *)AD_TEST_TXT2;
	pADList->item[4].type = AD_CONTENT_TXT;
	pADList->item[4].u.text = (uint8 *)AD_TEST_TXT3;
	pADList->item[1].type = AD_CONTENT_PIC;
	pADList->item[1].u.pic.pData = SGL_LoadBitmap(BMP_AD_TEST1, &pADList->item[1].u.pic.width, &pADList->item[1].u.pic.height);
	pADList->item[3].type = AD_CONTENT_PIC;
	pADList->item[3].u.pic.pData = SGL_LoadBitmap(BMP_AD_TEST2, &pADList->item[3].u.pic.width, &pADList->item[3].u.pic.height);
	*/
	pADList = mrc_malloc(sizeof(AD_LIST)+ sizeof(AD_DATA));
	if(!pADList)
		return NULL;
	memset(pADList, 0, sizeof(AD_LIST)+sizeof(AD_DATA));
	
	pADList->num = 1;
	pADList->item[0].type = AD_CONTENT_PIC;
	pADList->item[0].u.pic.pData = SGL_LoadBitmap(BMP_AD_TEST1, &pADList->item[0].u.pic.width, &pADList->item[0].u.pic.height);
	return pADList;
}

